package vn.easyticket.db.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class M062_WebUserInRolesPK
   implements Serializable

{
    private static final long serialVersionUID = -4487976369132150036L;

    @Column( name = "UserId", nullable = false )
    private int userId;

    @Column( name = "RoleId", nullable = false )
    private int roleId;

    public M062_WebUserInRolesPK()
    {
    }

    public M062_WebUserInRolesPK( int userId, int roleId )
    {
        this.userId = userId;
        this.roleId = roleId;
    }

    public int getUserId()
    {
        return userId;
    }

    public void setUserId( int userId )
    {
        this.userId = userId;
    }

    public int getRoleId()
    {
        return roleId;
    }

    public void setRoleId( int roleId )
    {
        this.roleId = roleId;
    }

    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += (int) userId;
        hash += (int) roleId;
        return hash;
    }

    @Override
    public boolean equals( Object object )
    {
        if ( !( object instanceof M062_WebUserInRolesPK ) )
        {
            return false;
        }
        M062_WebUserInRolesPK other = (M062_WebUserInRolesPK) object;
        if ( this.userId != other.userId )
        {
            return false;
        }
        if ( this.roleId != other.roleId )
        {
            return false;
        }
        return true;
    }

    @Override
    public String toString()
    {
        return "Easyticket.dbo.WebUserInRolesPK[ userId=" + userId + ", roleId=" + roleId + " ]";
    }

}
